<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="format-detection" content="telephone=no">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<title>拼字</title>
	<link rel="stylesheet" type="text/css" href="css/base.css">
	<link rel="stylesheet" type="text/css" href="css/my.css" />
	<link rel="stylesheet" type="text/css" href="css/mui.min.css" />
	<script src="js/rem.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
	<div class="bg"></div>
	<div class="my-content">

	</div>
	<!-- <div class="my-c true">
		<div class="name">奖品名称:100元套餐</div>
		<div class="detail">兑换期限：2018-06-03至2018-06-20</div>
		<div class="status status-o">未核销</div>
		<div class="active">
			<img src="./image/duihuan.png" alt="">
		</div>
	</div>
	<div class="my-c true">
		<div class="name">奖品名称:100元套餐</div>
		<div class="detail">兑换期限：2018-06-03至2018-06-20</div>
		<div class="status status-t">已核销</div>
		<div class="active">
			<img src="./image/duihuan.png" alt="">
		</div>
	</div>
	<div class="my-c false">
		<div class="name">奖品名称:100元套餐</div>
		<div class="detail">兑换期限：2018-06-03至2018-06-20</div>
		<div class="status status-s">已失效</div>
	</div>
	<div class="my-c false">
		<div class="name">奖品名称:100元套餐</div>
		<div class="detail">限当日使用</div>
	</div> -->
</body>
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="libs/base.js"></script>
<script type="text/javascript">
	$('.my-c').click(function(){
		location.href = 'details.html'
	})
	ajax.request({
		params:{
			action:'mygifts',
			wxopenid:getUserInfo().ResultData.wxopenid,
		},callback:function(res){
			console.log(res)
			var dom='';
			for (var i=0;i<res.length;i++){
				dom+='<div class="my-c false" data-url="'+res[i].exchangeaddress+'">'
						+'<div class="name">奖品名称:'+res[i].name+'</div>'
						+'<div class="detail">兑换期限：'+res[i].exchangestartdate+'至'+res[i].exchangeenddate+'</div>'
						+'<div class="status status-o">'+res[i].status+'</div>'
					+'</div>'
			}
			$('.my-content').html(dom)
		}
	})
	$('.my-content').on('click','.my-c',function(){
		if($(this).data('url')){
			location.href=$(this).data('url');
		}
		
	})
</script>

</html>